\documentstyle[lslide]{article}
\pagestyle{headings}

\newlength{\foolen}
\setlength{\foolen}{\textheight}
\setlength{\textheight}{420pt} % \textwidth
\setlength{\textwidth}{\foolen}
\addtolength{\textwidth}{1.5in}
\setlength{\headsep}{0in}
\addtolength{\footskip}{-.2in}
\setlength{\headheight}{-.6in}
\input{psfigure}
\begin{document}

\setcounter{page}{21}
\def\footstring{1992 VASC Retreat (mwm)}
\setlength{\unitlength}{1in}

\slidehead{Utah Raster Toolkit}

\begin{itemize}

\item The Utah Raster Toolkit (URT) is a device independent image
manipulation package (similar to the GIL)

\item Originally, thr URT was the only way to interact with rayshade.  However,
since I've built the gil2rle and rle2gil converters, you need not concern
yourself with the URT, you can work almost entirely within the GIL and still
use rayshade to its fullest.

\item {\bf However}, if you're like me, and have some problems with the GIL, then I
suggest you take a look at the URT.
\end{itemize}

\newpage

\slidehead{URT Developers}

The URT is public domain code developed by many people, but primarily
Spencer Thomas at the University of Utah (spencer.w.thomas@med.umich.edu)

\begin{description}

\item[URT 3.0] is installed on the Suns (with minor extensions by mwm (me);
{\tt rle2gil, gil2rle}).  Original source can be found in {\tt
/alex/edu/utah/cs/pub/}, in files {\tt urt-3.0.tar.Z, urt-3.0.patch1,
urt-3.0.patch2.Z, urt-doc.tar, urt-img.tar}.

\item[URT 3.0] is also installed in a CS misc collection, without the
GIL/RLE converters.  
\end{description}

\newpage

\slidehead{What is the URT?}

\begin{itemize}
\item Set of tools for image manipulation (zoom, rotate, merge, display, etc)
\item Access is via simple UNIX commands and pipes, or a C library
\item C library interface is scanline-based
\item Image format supports up to 255 color channels, each with 8 bit integers;
\item Easy to convert between other formats (GIL, GIF, MacPaint; PBM not
compiled at CMU yet)
\item Many display devices supported (X11, PostScript, \LaTeX, Scribe, Iris
(not compiled))
\end{itemize}

\newpage
\slidehead{Long-Winded Examples}

{\em Taken from /IUS/usrc31/ray/urt-3.0/doc/rle.mss}

\newpage
\slidehead{URT v. GIL: The Good Side}

\begin{itemize}
\item X display tool works!! Even on monochrome displays!!  
\item X display tool opens a new window every time; you can fill your
screen with little windows, no monolithic display
\item Color images can pass through filters
\item Format supports multiple images in one file, e.g. for animation (which
the X display tool supports)
\item HISTORY tells you image sequence
\item Control over intensity (and color, sort of) in stereo pair display
\item Simple \LaTeX, Scribe, PostScript interfaces
\end{itemize}

\newpage
\slidehead{URT v. GIL: The Bad Side}
\begin{itemize}

\item URT Commands often core dump on bad parameters (but this still beats
xdisptool, which core dumps on {\tt imgcp constant:127 suntools0})
\item Dozens of annoying little filters (only 6-10 are commonly used)
\item URT C-level interface is just scanlines in sequential order; GIL allows
arbitary pixel access
\item URT only has unsigned 8-bit channels, GIL supports floating point
\item URT has no text support
\item URT only allows positive pixel indicies
\end{itemize}
\newpage

\slidehead{URT File Format}
\begin{itemize}
\item Run-length encoded (RLE) format
\item Portable; files are interpreted as byte streams, no need to swap bytes
between machines
\item Up to 255 8-bit channels (usually 1 or 3, for 24-bit color), plus an 8
bit mask channel (called an {\em alpha channel})
\item optional Header fields
\begin{itemize}
\item background color with linear slope
\item color map
\item comments (e.g. HISTORY comment shows all steps taken in generating this
image)
\end{itemize}
\item C interface via increasing scanlines or direct ``raw'' opcodes
\end{itemize}

\newpage

\slidehead{Displaying Images}

There are lots of (confusing) ways to view an image.  Often you'll have to
try several of these before the image looks ``right.''

\begin{description}
\item[X terminal]  {\em Nice(!)} X display tool; this sells the package
\begin{itemize}
\item  Supports color, greyscale, monochrome terminals
\item  Interactive zoom function
\item  Interactive animation (forward, backward, step)
\end{itemize}
\begin{description}
\item[\tt getx11 foo.rle] {\em Color dithering with 240 levels is the default.}
\item[\tt cat foo.rle $|$ getx11 -n 256] {\em Use 256 levels}
\item[\tt cat foo.rle $|$ getx11 -a] {\em No dithering, display ``as is''}
\item[\tt rlequant -b 6 -f  foo.rle $|$ getx11] {\em No dithering, use
variance-based quantization to 6 bits with ``fast'' heuristic}
\end{description}
\end{description}
\newpage

\slidehead{Displaying Images (continued)}

\begin{description}
\item[PostScript]  Can be sent to printer or included in documents
\begin{description}
\item[\tt rletops foo.rle] {\em Black and white image, 3 inches tall}
\item[\tt rletops -C foo.rle] {\em Color image}
\item[\tt rletops -s foo.rle] {\em \LaTeX/Scribe mode (suppresses showpage)}
\item[\tt rletops -s -c 0 -h 1] {\em Flush left, no showpage, 1 inch tall}
\end{description}

\item[GIF image on X] This seems to be the best combination:
\begin{description}
\item[\tt giftorle -c foo.gif $|$ rleflip -v $|$ getx11 -g 1] {\em  Maintain
original color map ({\tt -c}), flip vertically to restore orientation, view
with gamma of 1 (instead of 2.5 default)}
\end{description}
\end{description}

\newpage
\slidehead{Top Ten URT tools}

\begin{tabular}{rl}
{\bf getx11} & Display image in X11 window \\
{\bf rletops} & Generate Postcript (scalable, color, \LaTeX/Scribe options) \\
{\bf rle2gil} & Convert any RLE image to GIL format \\
{\bf gil2rle} & Convert 8-bit single-channel GIL image to RLE format \\
& (doesn't preserve comments or translate color images yet) \\
{\bf rlezoom} & Magnify image (brute force, integer multiples only) \\
{\bf rlequant} & Perform variance-based quantization \\
{\bf rlestereo} & Make two-color stereo image (tunable colors!!!) \\
{\bf rlehdr} & Show header info \\
{\bf rlecomp} & Merge two images (over, in, xor, etc) \\
{\bf fant} & Fine-tuned rotation ($-45^\circ < x < 45^\circ$) or scaling \\
\end{tabular}

\newpage
\slidehead{.... And Just a Few More}

\begin{tabular}{rl}
{\bf rleflip} & Perform gross (90 degree) rotation \\
{\bf repos} & Change offset in header \\
{\bf crop} & Prune image \\
{\bf ldmap} & Create colormap (linear, gamma-corrected) \\
{\bf applymap} & Apply colormap to image \\
{\bf to8} & Dither 24 bit image (256-elt color map still has \\
& 24 bit colors) \\
{\bf tobw} & 24 bits to 8 using YIQ transform \\
{\bf painttorle} & with {\bf rletopaint}, a MacPaint interface \\
\end{tabular}


\newpage
\slidehead{Sample Source Code}

If you want to write a C program that uses the URT, you should familiarize
yourself with some existing applications.  Three good places to start can be
found in {\tt /IUS/usrc31/ray/urt-3.0/} on the suns:

\begin{description}
\item[\tt tools/rleskel.c]  URT command skeleton.
\item[\tt mwm/rle2gil.c]  Very general RLE to GIL converter
\item[\tt mwm/getrow.c]  Sample application.  Extracts a scanline from an
RLE file.  Output is either the scanline in ASCII or an RLE image of the
same dimensions with that row highlighted.
\end{description}

\newpage
\slidehead{Where to find the URT}
\begin{description}
\item[SunOS]  Everything is located in {\tt /IUS/usrc31/ray/}
\begin{description}
\item[bin/] Executables
\item[man/] Manual pages.  Put this in your login file: \\ {\tt alias rleman
man -M /IUS/usrc31/ray/man}
\item[urt-3.0] Complete source tree
\item[urt-3.0/img] Sample images
\end{description}

\item[Mach]  You must {\tt setpath -i99 /usr/misc/.rayshade} to get
executables and man pages in your paths.  The source is in {\tt
/afs/cs/misc/rayshade/build/src/urt-3.0}, sample images in {\tt
/usr/misc/.rayshade/doc/img}

\end{description}
\end{document}
